﻿using System;

namespace Program05
{
    class Program
    {
        static void Main(string[] args)
        {
            string sex;//性别
            int height;//身高
            double weoght;//体重
            double nan;//标准体重
            Console.WriteLine("请输入您的性别(男/女):");
            sex = Console.ReadLine();
            if (sex == "男")
            {
                Console.WriteLine("请输入您额身高(cm):");
                height = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("请输入您的体重(kg):");
                weoght = Convert.ToDouble(Console.ReadLine());
                nan = (height - 80) * 0.7;

                if (weoght  < nan-(nan * 0.1))
                {
                    Console.WriteLine("您的健康状况是:体重过轻");
                }
                else if (weoght > nan+(nan * 0.1))
                {
                    Console.WriteLine("您的健康状况是:体重过重");
                }
                else if (weoght <nan-(nan * 0.2))
                {
                    Console.WriteLine("您的健康状况是:体重不足");
                }
                else if (weoght >nan+(nan * 0.2))
                {
                    Console.WriteLine("您的健康状况是:过于肥胖");
                }
                else if (weoght <=nan+(nan * 0.1) && weoght>=nan-(nan * 0.1)) 
                {
                    Console.WriteLine("您的健康状况是:身体健康");
                }
            }
            else if (sex == "女")
            {
                Console.WriteLine("请输入您额身高(cm):");
                height = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("请输入您的体重(kg):");
                weoght = Convert.ToDouble(Console.ReadLine());
                nan = (height - 70) * 0.6;

                if (weoght < nan - (nan * 0.1))
                {
                    Console.WriteLine("您的健康状况是:体重过轻");
                }
                else if (weoght > nan + (nan * 0.1))
                {
                    Console.WriteLine("您的健康状况是:体重过重");
                }
                else if (weoght < nan - (nan * 0.2))
                {
                    Console.WriteLine("您的健康状况是:体重不足");
                }
                else if (weoght > nan + (nan * 0.2))
                {
                    Console.WriteLine("您的健康状况是:过于肥胖");
                }
                else if (weoght <= nan + (nan * 0.1) && weoght >= nan - (nan * 0.1))
                {
                    Console.WriteLine("您的健康状况是:身体健康");
                }
            }
            else
            {
                Console.WriteLine("您输入数据有误");
            }
           
        }
    }
}
